<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>答题卡</title>
    <link rel="stylesheet" href="css/answerCardPublic.css">
</head>

<body>
    <div class="answer-box">
        <p class="title">新建答题卡<span class="close-icon"></span></p>
        <div class="answer-main">
            <ul>
                <li>
                    大标题：<span class="fl-r"></span>
                    <input id="title" type="text" class="handline-inp" placeholder="2018-2019学年度第一学期期中考试">
                </li>
                <li class="children-s">
                    <div>
                        <span>试题编号:</span><input id="min-num" class="num-inp" type="text" value="5">-<input type="text"
                            class="num-inp" value="20" id="max-num">
                    </div>
                    <div>
                        <span>排列方向:</span>
                        <select id="way">
                            <option value="0">横向</option>
                            <option value="1">纵向</option>
                        </select>
                    </div>
                </li>
                <li class="children-s">
                    <div>
                        <span>每组题数:</span><input type="text" value="5" id="row-num">
                    </div>
                    <div>
                        <span>选项长度:</span><input id="per" type="text" value="4">
                    </div>
                </li>
            </ul>
        </div>
        <div class="btn-box">
            <input class="save" type="button" value="保存" id="save">
            <input class="cancel" type="button" value="取消">
        </div>
    </div>
    <script src="./js/public.js"></script>
    <script>
        var createobj = {
            ele: "<div>",
            ele1: "</div>",
            root: true,
            rowNum: {
                ele: "<div>",
                ele1: "</div>",
                start: parseInt(getNodeval("min-num")),
                end: parseInt(getNodeval("max-num")),
                rowNum: {
                    ele: "<span>",
                    ele1: "</span>",
                    start: 0,
                    arr: [],
                    end: parseInt(getNodeval("row-num"))
                }
            }
        }
        save.onclick = function () {
            var div = document.createElement("div")
            div.innerHTML = createNode(createobj)
            document.body.appendChild(div)
        }
    </script>
</body>

</html>